import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from "rxjs";

@Injectable({
  providedIn: 'root'
})
export class FinanceMachineTestScoreService {

  serviceUrls = {
    machineScoreListUrl: '/userFrequencyRecord/list', // 验机分List
    exportmachineScoreUrl: '/userFrequencyRecord/getOrderExcel' // 导出验机分
  };

  constructor(public httpClient: HttpClient) { }

  // 查询验机分List
  getFinanceMachineScoreList(params: any) {
    return this.httpClient.post(this.serviceUrls.machineScoreListUrl, params).toPromise();
  }

  // 导出验机分
  exportmachineScoreData(params: any) {
    return this.httpClient.get(this.serviceUrls.exportmachineScoreUrl, { params, responseType: 'blob' }).toPromise();
  }
}



